package com.aliang.shopping.model.dto.goods;


import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;


@Data
@Document(indexName = "yx_shopping_goods")
public class GoodsEsDto {

    /**
     * 数据ID
     */
//    @Id
    @Field(type = FieldType.Keyword)
    private Long id;

    /**
     * 商品名
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String goodsName;

    /**
     * 商品主图
     */
    @Field(type = FieldType.Text)
    private String mainImages;
    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 销售数量
     */
    private Integer saleNum;
}
